home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 37 / CD Expert nº 37.iso / LastCall / lastcall.exe / stuff / recipe.dxr / 00002.ls < prev    next >
Encoding:
Text File  |  2000-03-23  |  1.3 KB  |  57 lines

  1. on buildRecipeList letter
  2.   global gRecipes
  3.   allText = EMPTY
  4.   repeat with thisRecipe in gRecipes
  5.     if thisRecipe[#drinkName] starts letter then
  6.       if inRecipeMode() then
  7.         allText = allText & thisRecipe[#drinkName] & RETURN
  8.         next repeat
  9.       end if
  10.       recipeInfo = createRecipe(thisRecipe[#RECID])
  11.       allText = allText & thisRecipe[#drinkName] & RETURN & recipeInfo[#text] & RETURN & RETURN
  12.     end if
  13.   end repeat
  14.   if allText = EMPTY then
  15.     allText = "No matching recipes"
  16.   else
  17.     delete char -30000 of allText
  18.   end if
  19.   return allText
  20. end
  21.  
  22. on hasRecipes letter
  23.   global gRecipes
  24.   repeat with thisRecipe in gRecipes
  25.     if thisRecipe[#drinkName] starts letter then
  26.       return 1
  27.     end if
  28.   end repeat
  29.   return 0
  30. end
  31.  
  32. on adjustText
  33.   repeat with X = 1 to the number of castLibs
  34.     repeat with Y = 1 to the number of castMembers of castLib X
  35.       thisOne = member(Y, X)
  36.       if thisOne.type = #text then
  37.         thisOne.UseHypertextStyles = 0
  38.       end if
  39.     end repeat
  40.   end repeat
  41. end
  42.  
  43. on showSpecificHelp topicCode
  44.   customHelpTopic(topicCode)
  45. end
  46.  
  47. on findRecipeByName findRecipe, slotNum
  48.   global gRecipes
  49.   repeat with thisRecipe in gRecipes
  50.     if thisRecipe[#drinkName] = findRecipe then
  51.       recipeInfo = createRecipe(thisRecipe[#RECID])
  52.       return integer(thisRecipe[#RECID])
  53.     end if
  54.   end repeat
  55.   return 0
  56. end
  57.